package com.cis467.mrball;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;


public class MainMenu extends Activity 
	{
	/**
	 * Called when the activity is first created.
	 */
	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.mainmenu_layout);

		Button continueButton = (Button) findViewById(R.id.continueButton);
		Button levelSelectButton = (Button) findViewById(R.id.levelSelectButton);
		Button exitButton = (Button) findViewById(R.id.exitButton);

		//displays picture when clicked
		continueButton.setOnClickListener(new View.OnClickListener() {
			
			public void onClick(View v) {
				Intent i = new Intent(v.getContext(), MrBall.class);
                startActivity(i);
			}
			
		});
		
		//displays level menu
		levelSelectButton.setOnClickListener(new View.OnClickListener() {
			
			public void onClick(View v) {
				Intent l = new Intent(v.getContext(), LevelMenu.class);
                startActivity(l);
			}
			
		});
		
		//displays home page, exits app
		exitButton.setOnClickListener(new View.OnClickListener() {

			public void onClick(View v) {
				finish();
			}
		});
	}

	}

